package com.jyy.prefabricated.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyy.prefabricated.enums.BaseTeamEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 课程分类
 */
@Data
public class CourseCategory implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 课程分类
     */
    @NotNull(message = "课程分类不能为空")
    private String category;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 父级id
     */
    private Integer pid;

    /**
     * 租户编码
     */
    private String teamCode = BaseTeamEnum.BASE.getValue();

    /**
     * 类型（0：其他课程类型；1，资料文档课程）
     */
    private Integer type;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

}